package cn.itsub.javablog.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;


@Component
@Slf4j
public class ScheduleTask {

    //每隔1小时执行一次
    @Scheduled(fixedRate = 1000*60*60*1)
    @Transactional
    int demo(){

        return 0;
    }
}
